package com.gxa.saas.service.impl;

import com.gxa.saas.mapper.SaleStoresMapper;
import com.gxa.saas.pojo.SaleStores;
import com.gxa.saas.service.SalestoresService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(rollbackFor = Throwable.class)
public class SalestoresServiceImpl implements SalestoresService {
    @Autowired
    SaleStoresMapper saleStoresMapper;
    @Override
    public List<SaleStores> selectAll() {
      return   saleStoresMapper.selectAll();
    }

    @Override
    public List<SaleStores> selectByPage(Integer page, Integer size) {
     return    saleStoresMapper.selectByPage(size*(page-1),size);
    }

    @Override
    public List<SaleStores> selectByTime(String time) {
      return    saleStoresMapper.selectByTime(time);
    }

}
